function [CNC_state,CNC_swork,needtime,loo]=RGVrun(sign,RGV_x_now,CNC_state,CNC_swork,t)
i=sign;
     switch i
        case {1,5}
            i=1;
        case {2,6}
            i=2;
        case {3,7}
            i=3;
        case {4,8}
            i=4;
     end
    needtime=t(abs(i-RGV_x_now)+1);
    loo=i;
end